package com.util;

import lombok.Data;

import java.util.List;

@Data
public class Result<T> {
    /**
     * 状态码
     */
    private String code;
    /**
     * 返回信息
     */
    private String msg;
    /**
     *
     */
    private int count;
    /**
     * 数据
     */
    private List<T> data;

    public Result(){

    }
    public Result(ResultEnum resultEnum, int count, List<T> data) {
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
        this.count = count;
        this.data = data;
    }
    public Result(String code, String msg, int count, List<T> data) {
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }
}
